package com.xingmei.springbootdemo.controller;

import com.xingmei.springbootdemo.common.ResultVo;
import com.xingmei.springbootdemo.model.User;
import com.xingmei.springbootdemo.service.UserService;
import com.xingmei.springbootdemo.service.impl.NoParentServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

@RestController
@RequestMapping(value = "/transaction")
public class TransactionController {

    @Autowired
    private NoParentServiceImpl noParentServiceImpl;

    @Autowired
    private UserService userService;

    @GetMapping(value = "/test")
    public ResultVo innerCall(@RequestParam("name") String name, @RequestParam("age") Integer age){
        userService.saveUserWrapper(User.builder().name(name).age(age).build());
        return ResultVo.success();
    }

}
